//
//  NIControlProperties.h
//  控件的通用属性,和settingPlist对应
//  Created by 　罗若文 on 16/3/31.
//  Copyright © 2016年 罗若文. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface NIControlProperties : NSObject

#pragma mark - 参数
@property (nonatomic) NSInteger textAlignment;              //靠边0,1,2      默认0左边
@property (nonatomic,strong) UIColor * backgroundColor;     //背景颜色        默认透明
@property (nonatomic) NSInteger numberOfLines;              //文字有几行显示   默认0
@property (nonatomic,strong) UIColor * textColor;           //文本颜色        默认黑色
@property (nonatomic,strong) UIColor * placeholderColor;    //placeholder的颜色,有就是用,没有就用系统默认的  999999

@property (nonatomic) BOOL upBorder;                        //上边界       默认YES
@property (nonatomic) BOOL downBorder;                      //下边界       默认YES
@property (nonatomic) BOOL leftBorder;                      //左边界       默认YES
@property (nonatomic) BOOL rightBorder;                     //右边界       默认YES

@property (nonatomic,strong) UIFont * font;                 //字体
@property (nonatomic,strong) NSString * fontName;           //字体名字      默认nil
@property (nonatomic) float fontSize;                       //字体大小      默认17

@property (nonatomic,strong) CALayer *layer;                //属性
@property (nonatomic) float borderWidth;                    //边框宽度      默认0
@property (nonatomic,strong) UIColor * borderColor;         //边框颜色      默认 dddddd
@property (nonatomic) float cornerRadius;                   //拐角弧度      默认0
@property (nonatomic) BOOL masksToBounds;                   //              默认YES

///初始化方法  根据Settings.plist中的ControlProperties 生成属性对象
-(instancetype)init:(NSString *)plistStyleKey;

///初始化方法  根据NSDictionary 字典生成属性对象
///{"textAlignment":"0","backgroundColor":"clearColor","numberOfLines":"0","textColor":"000000","placeholderColor":"999999","upBorder":YES,"downBorder":YES,"leftBorder":YES,"rightBorder":YES,"fontName":"","fontSize":"17","borderWidth":"0","borderColor":"dddddd","cornerRadius":"0","masksToBounds":YES}
- (instancetype)initWithDict:(NSDictionary *)ControlPropertiesDic;
@end
